package net.starwifi.duobao.repository;

import net.starwifi.duobao.entity.DBOrder;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

/**
 * Created by Administrator on 2015/7/17.
 */
public interface DBOrderRepository extends Repository<DBOrder,Long> {

    public DBOrder findBySn(String sn);

    @Modifying
    @Query(value = "update net.starwifi.duobao.entity.DBOrder o set o.productMedium=?2 where o.productId=?1")
    public void updateOrderImage(Long productId,String imageUrl);

}
